package com.asset.servlet.stock;
/**
 *@ClassName AddServlet
 *@Author B21015118吴逸鑫
 *@Date 2022/6/9 20:04
 **/
import com.asset.service.StockService;
import com.asset.service.impl.StockServiceImpl;


import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

@WebServlet("/addServlet2")
public class AddServlet2 extends HttpServlet {
    StockService bookService = new StockServiceImpl();

    @Override
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

        bookService.add(request, response);

    }


    @Override
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        request.setCharacterEncoding("utf-8");
        response.setContentType("text/html;charset=utf-8");
        doGet(request, response);
    }
}

